//
//  ZXStatusTool.m
//  ZXOCWeiBo
//
//  Created by mac on 15/12/9.
//  Copyright © 2015年 itcast. All rights reserved.
//

#import "ZXStatusTool.h"
#import "ZXHttpTool.h"
#import "ZXHomeStatusParam.h"
#import "ZXHomeStatusResult.h"
#import "ZXSendStatusParam.h"
#import "ZXSendStatuResult.h"

@implementation ZXStatusTool

+(void)homeStatusWithUrl:(NSString *)url params:(ZXHomeStatusParam *)params success:(void (^)(ZXHomeStatusResult *))success failure:(void (^)(NSError *))failure
{
    [self getWithUrl:url params:params resultClass:[ZXHomeStatusResult class] success:success failure:failure];
}

//+(void)homeStatusWithUrl:(NSString *)url params:(ZXHomeStatusParam *)params success:(void (^)(ZXHomeStatusResult * result))success failure:(void (^)(NSError *))failure
//{
//    [ZXHttpTool GET:url params:params.keyValues success:^(id responseObject) {
////        //将返回的数据封装成模型
//        ZXHomeStatusResult * result = [ZXHomeStatusResult objectWithKeyValues:responseObject];
//        
//        if (success) {
//            success(result);
//        }
//    } failure:^(NSError *error) {
//        ZXLog(@"");
//        if (failure) {
//            failure(error);
//        }
//    }];
//}
+(void)sendStatusWithUrl:(NSString *)url params:(ZXSendStatusParam *)params success:(void (^)(ZXSendStatuResult * result))success failure:(void(^)(NSError *error))failure
{
    [self postWithUrl:url params:params resultClass:[ZXSendStatuResult class] success:success failure:failure];
    
//    [ZXHttpTool POST:url params:params.keyValues success:^(id responseObject) {
//        ZXSendStatuResult * result = [ZXSendStatuResult objectWithKeyValues:responseObject];
//        if (success) {
//            success(result);
//        }
//             } failure:^(NSError *error) {
//                 if (error) {
//                     failure(error);
//                 }
//             }];
}
@end
